<!--{Atemplate admin/header}-->

<!--{eval echo $this->Ahtml_js_aurl();}-->

<script src="{Acan_path_js}/plugin/ichart.1.2.min.js"></script>
<script>
jQuery(document).ready(function(){

});
$(function(){
	var pv=$json_money,ip=$json_num;
	var data = [{name : '充值',value:pv,color:'#0d8ecf',line_width:2},{name : '成交单数',value:ip,color:'#ef7707',line_width:2}];
	var labels = $json_date;
	var line = new iChart.LineBasic2D({
		render : 'week_sell',
		data: data,
		align:'center',
		title : '快号最近7天充值趋势',
		subtitle : '7日合计充值$total_money 元,日均充值$dayavg 元,成交$total_num 单,每单均价：$avg 元',
		footnote : '数据来源：快号',
		width : 800,
		height : 400,
		tip:{
			enable:true,shadow:true,
			move_duration:400,
			border:{enable:true,radius : 5,width:2,color:'#3f8695'},
			listeners:{
				 //tip:提示框对象、name:数据名称、value:数据值、text:当前文本、i:数据点的索引
				parseText:function(tip,name,value,text,i){
					return name+":"+value+"";
				}
			}
		},
		tipMocker:function(tips,i){
			return "<div style='font-weight:600'>"+
					labels[i]+" "+//日期
					//(((i%12)*2<10?"0":"")+(i%12)*2)+":00"+//时间
					"</div>"+tips.join("<br/>");
		},
		legend : {
			enable : true,
			row:1,//设置在一行上显示，与column配合使用
			column : 'max',
			valign:'top',
			sign:'bar',
			background_color:null,//设置透明背景
			offsetx:-80,//设置x轴偏移，满足位置需要
			border : true
		},
		crosshair:{enable:true,line_color:'#62bce9'},
		sub_option : {label:false,point_size:10},
		coordinate:{width:700,height:240,
			axis:{color:'#dcdcdc',width:1},
			scale:[{position:'left',start_scale:0,end_scale:100,scale_space:10,scale_size:2,scale_color:'#9f9f9f'},{position:'bottom',labels:labels}]
		}
	});
//开始画图
line.draw();
/*
	new iChart.Bar2D({
		render : 'day7',
		background_color : '#EEEEEE',
		data: $json_day5data,
		title : '近一周各品种销量',
		subtitle : '',
		footnote : '数据来源：很多人咖啡',
		width : 600,
		height : 500,
		coordinate:{
			width:400,
			height:400,
			scale:[{
				 position:'bottom',	
				 start_scale:0,
				 end_scale:$day5max,
				 scale_space:5
			}]
		},
		sub_option:{
			border:{
				enable : false
			},
			label:{color:'#333333'}
		},
		shadow:true,
		shadow_color:'#8d8d8d',
		shadow_blur:1,
		shadow_offsety:1,
		shadow_offsetx:1,
		legend:{enable:false}
	}).draw();*/
});
</script>
<div class="-main stat">
<div id="week_sell" class="_chart"></div>
<div id="day7" class="_chart"></div>
</div>

<!--{Atemplate admin/footer}-->